home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / src / depth.h < prev    next >
C/C++ Source or Header  |  1999-02-04  |  3KB  |  103 lines

  1. /* $Id: depth.h,v 3.1 1998/08/23 22:17:42 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.0
  6.  * Copyright (C) 1995-1998  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: depth.h,v $
  26.  * Revision 3.1  1998/08/23 22:17:42  brianp
  27.  * moved gl_DepthRange() to matrix.c
  28.  *
  29.  * Revision 3.0  1998/01/31 20:50:23  brianp
  30.  * initial rev
  31.  *
  32.  */
  33.  
  34.  
  35. #ifndef DEPTH_H
  36. #define DEPTH_H
  37.  
  38.  
  39. #include "types.h"
  40.  
  41.  
  42. /*
  43.  * Return the address of the Z-buffer value for window coordinate (x,y):
  44.  */
  45. #define Z_ADDRESS( CTX, X, Y )  \
  46.             ((CTX)->Buffer->Depth + (CTX)->Buffer->Width * (Y) + (X))
  47.  
  48.  
  49.  
  50.  
  51. extern GLuint
  52. gl_depth_test_span_generic( GLcontext* ctx, GLuint n, GLint x, GLint y,
  53.                             const GLdepth z[], GLubyte mask[] );
  54.  
  55. extern GLuint
  56. gl_depth_test_span_less( GLcontext* ctx, GLuint n, GLint x, GLint y,
  57.                          const GLdepth z[], GLubyte mask[] );
  58.  
  59. extern GLuint
  60. gl_depth_test_span_greater( GLcontext* ctx, GLuint n, GLint x, GLint y,
  61.                             const GLdepth z[], GLubyte mask[] );
  62.  
  63.  
  64.  
  65. extern void
  66. gl_depth_test_pixels_generic( GLcontext* ctx,
  67.                               GLuint n, const GLint x[], const GLint y[],
  68.                               const GLdepth z[], GLubyte mask[] );
  69.  
  70. extern void
  71. gl_depth_test_pixels_less( GLcontext* ctx,
  72.                            GLuint n, const GLint x[], const GLint y[],
  73.                            const GLdepth z[], GLubyte mask[] );
  74.  
  75. extern void
  76. gl_depth_test_pixels_greater( GLcontext* ctx,
  77.                               GLuint n, const GLint x[], const GLint y[],
  78.                               const GLdepth z[], GLubyte mask[] );
  79.  
  80.  
  81. extern void gl_read_depth_span_float( GLcontext* ctx,
  82.                                       GLuint n, GLint x, GLint y,
  83.                                       GLfloat depth[] );
  84.  
  85.  
  86. extern void gl_read_depth_span_int( GLcontext* ctx, GLuint n, GLint x, GLint y,
  87.                                     GLdepth depth[] );
  88.  
  89.  
  90. extern void gl_alloc_depth_buffer( GLcontext* ctx );
  91.  
  92.  
  93. extern void gl_clear_depth_buffer( GLcontext* ctx );
  94.  
  95.  
  96. extern void gl_ClearDepth( GLcontext* ctx, GLclampd depth );
  97.  
  98. extern void gl_DepthFunc( GLcontext* ctx, GLenum func );
  99.  
  100. extern void gl_DepthMask( GLcontext* ctx, GLboolean flag );
  101.  
  102. #endif
  103.